<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Creative - Bootstrap 3 Responsive Admin Template">
	<meta name="author" content="GeeksLabs">
	<meta name="keyword" content="Creative, Dashboard, Admin, Template, Theme, Bootstrap, Responsive, Retina, Minimal">
	<link rel="shortcut icon" href="img/favicon.png">
</head>
<body>
<form id="inputForm">
<input type="hidden" id="guestbookId" name="guestbookId" value="#(guestbook.id)">
<div class="modal-header">
	<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
	<h4 class="modal-title">回复</h4>
</div>
<div class="modal-body">
	<section class="content">
		<div class="panel panel-default" style="padding-bottom: 10px;">
			<div class="row data-type" style="margin: 10px 5px;border: 1px solid #d4d4d4;border-radius: 2px;">
				<div class="col-md-2 title rowHeight2x">回复</div>
                <div class="col-md-10 data rowHeight2x">
                    <textarea class="form-control" rows="3" placeholder="回复" name="replyContent"></textarea>
                </div>
			</div>
		</div>
	</section>
</div>
<div class="modal-footer">
	<button type="button" class="btn " data-dismiss="modal">关闭</button>
	<button type="submit" class="btn btn-primary">保存</button>
</div>
</form>
</body>
</html>
<script type="text/javascript">

$("#inputButton").on("click",function(){
	var replyContent = $("#replyContent").val();
	if(""==replyContent){
		alert("请填写回复内容!");
		return;
	}
	$.ajax({
        url: "#(base)/admin/guestbook/updateReply",
        type: "POST",
        data: $("#inputForm").serialize(),
        dataType: "json",
        cache: false,
        success: function(response) {
        	if (response.type == "success") {
        		alert("回复成功");
        		location.reload();
            }else{
                swal({title:'', text:response.msg,icon: 'error'});
            }
        }
    });
	
});

</script>